<template>
  <div class="box">
    <h1>A组件,{{ count.num }}</h1>
    <van-button type="primary" @click="count.increment">+</van-button>
    <van-button type="primary" @click="count.num--">-</van-button>
    <div v-for="item in goods.list">{{ item.name }}----{{ item.price }}</div>
  </div>
</template>

<script setup lang="ts">
import { useCount } from "../../store/count.ts";
import { useGoods } from "../../store/goods.ts";
const count = useCount();
const goods = useGoods();
</script>

<style scoped>
.box {
  height: 400px;
  border: 1px solid #333;
}
</style>
